<?php
require_once('config/config.php');
require_once('config/db_connect.php');

$auth = mysql_query('SELECT * FROM user WHERE username=\'' . $_SERVER['REMOTE_USER'] . '\'');
$authrow = mysql_fetch_array($auth);
$id = $authrow['id'];
$username = $authrow['username'];
if (($authrow['disabled'] == 1) && (!preg_match('/denied\.php/',$_SERVER["PHP_SELF"]))) { header('Location: denied.php'); }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
        <title>Pundit: Yum Update Portal</title>
	<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
</head>
<body>
<div class="header"><h1><a href=".">Pundit</a></h1></div>
<div class="header"><h3>&nbsp;Yum Update Portal</h3></div>
<?php if ($authrow['disabled'] == 0) { ?>
<h3><a href="index.php">Overview</a><?php if ($authrow['level'] == 1) { echo ' | <a href="servers.php">Servers</a> | <a href="users.php">Users</a>'; } ?> | <a href="log.php">Log</a> | <a href="usrinfo.php">Profile</a> | <small><small>Logged in as <?php echo $username; ?></small></small></h3>
<?php } ?>
<hr />
